//
//  DeviceSelectedListTableViewCell.swift
//  TJJPT
//
//  Created by FENGYL on 2017/6/23.
//  Copyright © 2017年 FENGYL. All rights reserved.
//

import UIKit

class DeviceSelectedListTableViewCell: UITableViewCell {
    
    @IBOutlet weak var onlineButton: UIButton!
    @IBOutlet weak var selectedButton: UIButton!
    @IBOutlet weak var deviceNameLabel: UILabel!
    @IBOutlet weak var lastConnectedLabel: UILabel!
    @IBOutlet weak var deviceSerialNumber: UILabel!
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

    func setUpCell(online:Bool, selected:Bool, deviceName:String, lastConnected:String, serialNumber:String) {
        
        self.onlineButton.isSelected = online
        self.selectedButton.isSelected = selected
        self.deviceNameLabel.text = deviceName
        self.lastConnectedLabel.text = lastConnected
        self.deviceSerialNumber.text = serialNumber
        
    }
    
}
